From 015c384bf9049a0f863a0602c422eb37b83a421a Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 20 Feb 2007 23:59:13 +0000 Subject: [PATCH] Put the set size in the structure on set-allocation. Signed-off-by: Ewan Mellor --- tools/libxen/include/xen_internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/libxen/include/xen_internal.h b/tools/libxen/include/xen_internal.h index 324fb88428..ac50de20b2 100644 --- a/tools/libxen/include/xen_internal.h +++ b/tools/libxen/include/xen_internal.h @@ -149,7 +149,10 @@ type__ ## _free(type__ handle) \ type__ ## _set * \ type__ ## _set_alloc(size_t size) \ { \ - return calloc(1, sizeof(type__ ## _set) + size * sizeof(type__)); \ + type__ ## _set *result = calloc(1, sizeof(type__ ## _set) + \ + size * sizeof(type__)); \ + result->size = size; \ + return result; \ } \ \ void \ -- 2.30.2